package org.lcx.pipeline;

import org.springframework.beans.factory.support.ManagedMap;

import org.lcx.pipeline.bean.PipelineExeption;
import org.lcx.pipeline.bean.PipelineResult;
import org.lcx.pipeline.impl.PipelineChain;

/**
 * pipelineManager接口<br>
 * pipeline定义的统一入口
 */
public interface PipelineManager {

	public String getId();

	public void setId(String id);

	public String getName();

	public void setName(String name);

	public ManagedMap<String, PipelineChain> getPipelineChains();

	public void setPipelineChains(ManagedMap<String, PipelineChain> pipelineChains);

	/**
	 *
	 * 执行pipeline chain处理<br>
	 * 根据chain name确定需要执行的chain
	 * 
	 * @param pChainName
	 * @param pParam
	 * @return
	 * @throws PipelineExeption
	 */
	public PipelineResult runProcess(String pChainName, Object pParam) throws PipelineExeption;
}
